<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::LabeledDataDistribution&lt; InputType, LabelType &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_labeled_data_distribution.html">LabeledDataDistribution</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_labeled_data_distribution-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::LabeledDataDistribution&lt; InputType, LabelType &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">

<p>A <a class="el" href="classshark_1_1_labeled_data_distribution.html" title="A LabeledDataDistribution defines a supervised learning problem.">LabeledDataDistribution</a> defines a supervised learning problem.  
 <a href="classshark_1_1_labeled_data_distribution.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_data_distribution_8h_source.html">shark/Data/DataDistribution.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a179adab2dc89217d47fe1d0736679c46" id="r_a179adab2dc89217d47fe1d0736679c46"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_labeled_data_distribution.html#a179adab2dc89217d47fe1d0736679c46">~LabeledDataDistribution</a> ()</td></tr>
<tr class="memdesc:a179adab2dc89217d47fe1d0736679c46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor.  <br /></td></tr>
<tr class="separator:a179adab2dc89217d47fe1d0736679c46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace4a2b81e54f0944d241b92a54f1a4c2" id="r_ace4a2b81e54f0944d241b92a54f1a4c2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_labeled_data_distribution.html#ace4a2b81e54f0944d241b92a54f1a4c2">draw</a> (<a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &amp;input, LabelType &amp;label) const =0</td></tr>
<tr class="memdesc:ace4a2b81e54f0944d241b92a54f1a4c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a single pair of input and label.  <br /></td></tr>
<tr class="separator:ace4a2b81e54f0944d241b92a54f1a4c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a198219fda4f514aa5bba30629e57dd8c" id="r_a198219fda4f514aa5bba30629e57dd8c"><td class="memItemLeft" align="right" valign="top">std::pair&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_labeled_data_distribution.html#a198219fda4f514aa5bba30629e57dd8c">operator()</a> ()</td></tr>
<tr class="separator:a198219fda4f514aa5bba30629e57dd8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace15c1b51c87cd4b553427a55416b155" id="r_ace15c1b51c87cd4b553427a55416b155"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_labeled_data_distribution.html#ace15c1b51c87cd4b553427a55416b155">generateDataset</a> (std::size_t size, std::size_t maximumBatchSize) const</td></tr>
<tr class="memdesc:ace15c1b51c87cd4b553427a55416b155"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a dataset with samples from from the distribution.  <br /></td></tr>
<tr class="separator:ace15c1b51c87cd4b553427a55416b155"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a812eed2420c425e7943e73503dcf1155" id="r_a812eed2420c425e7943e73503dcf1155"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_labeled_data_distribution.html#a812eed2420c425e7943e73503dcf1155">generateDataset</a> (std::size_t size) const</td></tr>
<tr class="memdesc:a812eed2420c425e7943e73503dcf1155"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a data set with samples from from the distribution.  <br /></td></tr>
<tr class="separator:a812eed2420c425e7943e73503dcf1155"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, class LabelType&gt;<br />
class shark::LabeledDataDistribution&lt; InputType, LabelType &gt;</div><p>A <a class="el" href="classshark_1_1_labeled_data_distribution.html" title="A LabeledDataDistribution defines a supervised learning problem.">LabeledDataDistribution</a> defines a supervised learning problem. </p>
<dl class="section user"><dt></dt><dd>The supervised learning problem is defined by an explicit distribution (in contrast to a finite dataset). The only method we need is to draw a sample from the distribution. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00108">108</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a179adab2dc89217d47fe1d0736679c46" name="a179adab2dc89217d47fe1d0736679c46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a179adab2dc89217d47fe1d0736679c46">&#9670;&#160;</a></span>~LabeledDataDistribution()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classshark_1_1_labeled_data_distribution.html">shark::LabeledDataDistribution</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::~<a class="el" href="classshark_1_1_labeled_data_distribution.html">LabeledDataDistribution</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Virtual destructor. </p>

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00112">112</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ace4a2b81e54f0944d241b92a54f1a4c2" name="ace4a2b81e54f0944d241b92a54f1a4c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace4a2b81e54f0944d241b92a54f1a4c2">&#9670;&#160;</a></span>draw()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classshark_1_1_labeled_data_distribution.html">shark::LabeledDataDistribution</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::draw </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &amp;&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LabelType &amp;&#160;</td>
          <td class="paramname"><em>label</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates a single pair of input and label. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">input</td><td>the generated input </td></tr>
    <tr><td class="paramname">label</td><td>the generated label </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classshark_1_1_wave.html#af7cfadb59070e2fb83ceaf464256dfb5">shark::Wave</a>, <a class="el" href="classshark_1_1_chessboard.html#a6717822ad9bda839acd8aa21d46d2117">shark::Chessboard</a>, <a class="el" href="classshark_1_1_pami_toy.html#a7b2eaab3d024a8731d184f3ed5f38949">shark::PamiToy</a>, <a class="el" href="classshark_1_1_circle_in_square.html#a69f09fa2492f510a2fd07f2020004eeb">shark::CircleInSquare</a>, and <a class="el" href="classshark_1_1_diagonal_with_circle.html#aead34d360cb03448e0ee6c8a400e0dd0">shark::DiagonalWithCircle</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_labeled_data_distribution.html#ace15c1b51c87cd4b553427a55416b155">shark::LabeledDataDistribution&lt; InputType, LabelType &gt;::generateDataset()</a>, and <a class="el" href="classshark_1_1_labeled_data_distribution.html#a198219fda4f514aa5bba30629e57dd8c">shark::LabeledDataDistribution&lt; InputType, LabelType &gt;::operator()()</a>.</p>

</div>
</div>
<a id="a812eed2420c425e7943e73503dcf1155" name="a812eed2420c425e7943e73503dcf1155"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a812eed2420c425e7943e73503dcf1155">&#9670;&#160;</a></span>generateDataset() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt; <a class="el" href="classshark_1_1_labeled_data_distribution.html">shark::LabeledDataDistribution</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::generateDataset </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates a data set with samples from from the distribution. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>the number of samples in the dataset </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00145">145</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_labeled_data_distribution.html#ace15c1b51c87cd4b553427a55416b155">shark::LabeledDataDistribution&lt; InputType, LabelType &gt;::generateDataset()</a>.</p>

</div>
</div>
<a id="ace15c1b51c87cd4b553427a55416b155" name="ace15c1b51c87cd4b553427a55416b155"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace15c1b51c87cd4b553427a55416b155">&#9670;&#160;</a></span>generateDataset() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt; <a class="el" href="classshark_1_1_labeled_data_distribution.html">shark::LabeledDataDistribution</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::generateDataset </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>maximumBatchSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates a dataset with samples from from the distribution. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>the number of samples in the dataset </td></tr>
    <tr><td class="paramname">maximumBatchSize</td><td>the maximum size of a batch </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00130">130</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

<p class="reference">References <a class="el" href="group__shark__globals.html#ga409b50a287df842bd49e7434a8bbf69e">shark::createLabeledDataFromRange()</a>, and <a class="el" href="classshark_1_1_labeled_data_distribution.html#ace4a2b81e54f0944d241b92a54f1a4c2">shark::LabeledDataDistribution&lt; InputType, LabelType &gt;::draw()</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_labeled_data_distribution.html#a812eed2420c425e7943e73503dcf1155">shark::LabeledDataDistribution&lt; InputType, LabelType &gt;::generateDataset()</a>, <a class="el" href="_c_svm_grid_search_tutorial_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>, <a class="el" href="_c_svm_linear_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>, and <a class="el" href="_c_svm_max_likelihood_m_s_8cpp.html#a28267e6f7ec1120183ffd7ae7a9a60d2">run_one_trial()</a>.</p>

</div>
</div>
<a id="a198219fda4f514aa5bba30629e57dd8c" name="a198219fda4f514aa5bba30629e57dd8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a198219fda4f514aa5bba30629e57dd8c">&#9670;&#160;</a></span>operator()()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::pair&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt; <a class="el" href="classshark_1_1_labeled_data_distribution.html">shark::LabeledDataDistribution</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::operator() </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00120">120</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_labeled_data_distribution.html#ace4a2b81e54f0944d241b92a54f1a4c2">shark::LabeledDataDistribution&lt; InputType, LabelType &gt;::draw()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Data/<a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
